﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SmartSpace.WebForm.SystemModule.SubViews
{
    public partial class ApplicationSummaryView : SubView
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        public override void OnShown(System.Collections.Specialized.NameValueCollection arguments)
        {
            Guid applicationId = new Guid(arguments["sel_id"]);

            Core.ICoreService service = SmartSapce.ServiceLocation.ServiceLocator.Get<Core.ICoreService>();
            Core.Application application = service.GetApplication(applicationId);

            _ctlLabelApplication.Text = application.Name;

            if (application.ThemeId != null)
            {
                Core.Theme theme = service.GetTheme(application.ThemeId.Value);
                _ctlLabelTheme.Text = theme.Caption;
            }
            else
            {
                _ctlLabelTheme.Text = "none";
            }
        }
    }
}